-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update allowing multiple locator pages #40
Conversation
This looks OK to me. Can we add a check so that, if there's only one locator, it automatically adds that relation? Keeps it simple if you're only using 1 locator on the site, but still allows the flexibility to use more than 1. Let me know what you think. |
@jirish I'll update per your note. I think that will keep it a bit easier to maintain. One thought for the multiple locator pages, will that affect the API call at all? We'll probably need to add (require) a get var in the url (i.e. I'll update the README to reflect this feature is needed. |
re: API call - probably not, unless we're just pulling a subset of locations based on a single locator. It shouldn't effect the Sheep Finder, for example |
That's kind of what I'm thinking, if there are multiple locators the API can pull from an individual locator rather than the whole set. If there's no getter var specified it'll return the whole list: https://gist.github.com/nhorstmeier/0a1a5349c528dc1c7af2#file-locator-php-L161 |
f0ae9dd
to
b0a5052
Compare
I've updated the PR with the latest version. How do we want to handle locations that belonged to a locator that has been unpublished/deleted? |
Not sure, should probably keep them (not delete) but indicate if they are orphaned somehow. Also, we have that "show in locator" checkbox - do we need that anymore if you can choose which locator to display it in? |
I would keep the show in locator option as you may want to disable a location temporarily. |
Yeah that makes sense |
b0a5052
to
b2eb290
Compare
Update allowing multiple locator pages
@jirish this is what I was thinking for supporting multiple Locator pages on a single site. There is one area that needs some work (onBeforeDelete). Ideally it would trigger on the deletion of the draft page not on un-publish which is what happens.
If this looks good other than the onBeforeDelete I'll update the README and update the PR to include notes on the usage. This will probably constitute a new tag as it changes the get functions for the locations.